package cn.wolfcode.trip.base.service;

import cn.wolfcode.trip.base.domain.ChatRoom;
import cn.wolfcode.trip.base.domain.User;

import java.util.List;

public interface IChatRoomService {

    //根据聊天室id查询聊天室用户
    List<User> selectUsersByChatRoomId(Long chatRoomId);
    //根据聊天室id查询聊天室名字  和内容
    List<ChatRoom> selectRoomName(Long roomId);

    void insert(ChatRoom chatRoom);

    /**
     * 根据聊天室id查询除当前登录者之外别人最新发送的信息
     * @param roomId
     * @return
     */
    List<ChatRoom> selectNewMessage(Long roomId, Long userId);

    void chanegSendState(Long id,Long uId);

    void createRoom(String[] str,String roomName);

    List<ChatRoom> selectRoomUsersByLoginId(Long loginId);

    List<User> selectRoomUsersByRoomId(Long roomId);

}
